home *** CD-ROM | disk | FTP | other *** search
- /* Draw a bevelled drop box using OpalPaint.
- */
-
-
- address 'OpalPaint_Rexx'
-
- options Results
-
- SaveSetUp
- GetRect
- parse var Result X1 Y1 X2 Y2
-
- Depth = 10 /* Could use AskInt here */
-
- GetPen
- RGBtoHSV Result
- Parse var Result Hue Sat Val
-
- /* Box body. Set up a diagonal HSV gradient */
-
- FillMode Gradient
- ClearColGrad
- ClearTransGrad
- ColourDither 0
- TransDither 0
-
- HSVtoRGB Hue Sat Val
- ColGradTag 0 Result
- S2 = (Sat-(0.4*65535))%1 /* Note: %1 converts number to an integer */
- S2 = MAX(S2,0)
- HSVtoRGB Hue S2 Val
- ColGradTag 0.5 Result
- HSVtoRGB Hue Sat Val
- ColGradTag 1 Result
- GradType LinearFree HSV
- GradRange X1+Depth Y1+Depth X2-Depth Y2-Depth
- SolidRect X1+Depth Y1+Depth X2-Depth Y2-Depth
-
- FillMode Solid
- /* Top */
-
- V2 = (Val+0.1*65535)%1
- V2 = MIN(V2,65535)
-
- HSVtoRGB Hue Sat V2
- SetPen Result
-
- SolidPoly X1 Y1 X2 Y1 X2-Depth Y1+Depth X1+Depth Y1+Depth X1 Y1
- LastPoint
-
-
- /* Right */
-
- V2 = (Val-0.15*65535)%1
- V2 = MAX(V2,0)
-
- HSVtoRGB Hue Sat V2
- SetPen Result
-
- SolidPoly X2 Y1 X2 Y2 X2-Depth Y2-Depth X2-Depth Y1+Depth X2 Y1
- LastPoint
-
- /* Left */
-
- V2 = (Val+0.15*65535)%1
- V2 = MIN(V2,65535)
-
- HSVtoRGB Hue Sat V2
- SetPen Result
-
- SolidPoly X1 Y1 X1+Depth Y1+Depth X1+Depth Y2-Depth X1 Y2 X1 Y1
- LastPoint
-
- /* Bottom */
-
- V2 = (Val-0.1*65535)%1
- V2 = MAX(V2,0)
-
- HSVtoRGB Hue Sat V2
- SetPen Result
-
- SolidPoly X2 Y2 X1 Y2 X1+Depth Y2-Depth X2-Depth Y2-Depth X2 Y2
- LastPoint
- RestoreSetUp
-